<template>
  <div class="upload">
    <div style="color: red">数据的存储形式-堆，栈</div>
    <br />
    <div>栈：存储基本数据类型 存储的就是一个值</div>
    <div>堆：存储引用数据类型 存储的是一个地址值</div>
  </div>
</template>

<script setup lang="ts">
let a = "1";
let b = a;
b = "2";
console.log(a, b); //1,2

let obj = {
  name: "d",
  c: {
    d: "4",
  },
};

let obj2 = obj;
obj2.c.d = "c";
console.log(obj, obj2); //都是 {name:'c'}
</script>

<style scoped lang="scss"></style>
